; Terrain Star Reduction

Terrain_Star_Reduction:

	MOV		R0, 10	
	
	PUSH 	{R0, R2-R6, LR}	
	MOV		R6, R1
	
	MOV		R5, 0								; Reduce Terrains Stars = 0
	
	MOV		R0, R9	
				
;-------------------------------------------------------------------------------

; Fixes the Terrain Reduction when No Powers are ON
	
	LDR		R0, [Terrain_Reduction_Fix]
	LDRB	R0, [R0]
	CMP		R0, 0
	MOVEQ	R6, 0
	
	ADD		R1, R5, R6							; Total Terrains Stars to reduce
	
	POP 	{R0, R2-R6, LR}
	BX 		LR

;-------------------------------------------------------------------------------

Terrain_Reduction_1:
	.dw Reg1_Skill
	
Terrain_Reduction_2:
	.dw Reg2_Skill

Terrain_Reduction_Fix:
	.dw 0x02183B64
	